From 095a9d8ca4c984b1a88ede18fb7a06d19eaae718 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sat, 24 Sep 2022 20:43:44 +0200
Subject: [PATCH 19/19] lldb: musl fixes

---
 lldb/source/Plugins/Process/Linux/Procfs.h | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git lldb/source/Plugins/Process/Linux/Procfs.h lldb/source/Plugins/Process/Linux/Procfs.h
index 3a0684320..933fb111e 100644
--- lldb/source/Plugins/Process/Linux/Procfs.h
+++ lldb/source/Plugins/Process/Linux/Procfs.h
@@ -17,23 +17,13 @@
 
 #include <vector>
 
-#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t
-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
-typedef struct user_fpsimd_state elf_fpregset_t;
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#elif defined(__mips__)
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#endif
-#else // __ANDROID__
+#if !defined(__GLIBC__) && defined(__powerpc__)
+#define pt_regs musl_pt_regs
+#include <sys/procfs.h>
+#undef pt_regs
+#else
 #include <sys/procfs.h>
-#endif // __ANDROID__
+#endif
 
 namespace lldb_private {
 namespace process_linux {
-- 
2.37.3

